unit ruretim;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Grids, Wwdbigrd, Wwdbgrid, StdCtrls, wwdbdatetimepicker, ppProd, ppClass,
  ppReport, ppComm, ppRelatv, ppDB, ppDBPipe, ppCtrls, ppVar, ppPrnabl,
  ppBands, ppCache;

type
  TFruretim = class(TForm)
    wwDBGrid1: TwwDBGrid;
    t2: TwwDBDateTimePicker;
    t1: TwwDBDateTimePicker;
    Button1: TButton;
    Button2: TButton;
    Label1: TLabel;
    Label2: TLabel;
    ppDBPipeline1: TppDBPipeline;
    uretim: TppReport;
    ppHeaderBand1: TppHeaderBand;
    ppDetailBand1: TppDetailBand;
    ppFooterBand1: TppFooterBand;
    ppTitleBand1: TppTitleBand;
    ppLabel1: TppLabel;
    ppSystemVariable1: TppSystemVariable;
    ppSystemVariable2: TppSystemVariable;
    ppDBText1: TppDBText;
    ppLabel2: TppLabel;
    ppDBText3: TppDBText;
    ppLabel4: TppLabel;
    ppDBText5: TppDBText;
    ppLabel6: TppLabel;
    ppLine1: TppLine;
    ppLine2: TppLine;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Fruretim: TFruretim;

implementation

uses dmrap;

{$R *.DFM}

procedure TFruretim.FormClose(Sender: TObject; var Action: TCloseAction);
begin
        action:=cafree;
        Fruretim:=nil;
end;

procedure TFruretim.Button2Click(Sender: TObject);
begin
close;
end;

procedure TFruretim.Button1Click(Sender: TObject);
begin
dmrapor.uretim.close;
dmrapor.uretim.Parameters.ParamByName('t1').value:=t1.date;
dmrapor.uretim.Parameters.ParamByName('t2').value:=t2.date;
dmrapor.uretim.Open;
uretim.Print;
end;

end.
